package main

import (
	"fmt"
	// "os"
	// "os/signal"
	"flag"
	"a.local/sub"
)

var (
	port = flag.Int("port", 50051, "The server port")
	myIp = flag.String("ip", "192.168.1.165", "The server ip")
	safety = flag.Int("safety", 3, "the safety level: 0 = all, 1 = only safe, 2 = dry run")
	mockMore = flag.Bool("mockMore", false, "mock more data")
)

func main() {
	flag.Parse()
	fmt.Printf("Starting server on port " + sub.Cyan("%d") +
		"..., server ip %s,dryRun: " +
		sub.Cyan("%v") + "\n", *port,
		sub.Cyan(*myIp), (*safety == 2))
	sub.Start(*myIp, *port, *safety, *mockMore)
}


